<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\HouseController;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

/* Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
    return $request->user();
});
 */

//非登录接口
Route::namespace('Http')->group(function () {
    //用户注册
    Route::post('register', [App\Http\Controllers\LoginController::class, 'register']);
    
    //登录
    Route::post('login', [App\Http\Controllers\LoginController::class, 'login']);
    Route::post('sms', [App\Http\Controllers\SmsController::class, 'sms']);


    //--------------------------------------- 房源 --------------------------------------------------/

    #banner图首页-列表
    Route::post('bannerList', [App\Http\Controllers\BannerController::class, 'getList']);
    #banner图app 端引导页
    Route::post('bannerList2', [App\Http\Controllers\BannerController::class, 'getList2']);
    #banner图app端开屏图片
    Route::post('bannerList3', [App\Http\Controllers\BannerController::class, 'getList3']);

    
    //app 版本更新列表
    Route::post('appVersionList', [App\Http\Controllers\AppVersionController::class, 'getList']);


    //消息管理列表-系统通知
    Route::post('messageNewsList', [App\Http\Controllers\MessageNewsController::class, 'getList']);
     //消息管理-获取第一条数据
    Route::post('messageNewsonelist', [App\Http\Controllers\MessageNewsController::class, 'getonelist']);


    //消息是否已读
    Route::post('messageNewsReadadd', [App\Http\Controllers\MessageNewsReadController::class, 'add']);


    //修改用户密码
    Route::post('editPwd', [App\Http\Controllers\LoginController::class, 'editPwd']);

    //修改 头像  昵称 手机号  姓名  性别
    Route::post('loginedit', [App\Http\Controllers\LoginController::class, 'edit']);

    //预约房子
    Route::post('houseLookAppointadd', [App\Http\Controllers\HouseLookAppointController::class, 'add']);
    Route::post('houseLookAppointlist', [App\Http\Controllers\HouseLookAppointController::class, 'getList']);

    //招商加盟

    Route::post('joinadd', [App\Http\Controllers\JoinController::class, 'add']);

    //收藏列表
    Route::post('userCollectlist', [App\Http\Controllers\UserCollectController::class, 'getList']);
    Route::post('userCollectadd', [App\Http\Controllers\UserCollectController::class, 'add']);
    Route::post('userCollectdel', [App\Http\Controllers\UserCollectController::class, 'del']);

    //我的足迹
    Route::post('userVisitlist', [App\Http\Controllers\UserVisitController::class, 'getList']);
    Route::post('userVisitadd', [App\Http\Controllers\UserVisitController::class, 'add']);
    Route::post('userVisitdel', [App\Http\Controllers\UserVisitController::class, 'del']);


    //装修推荐
    Route::post('renovationlist', [App\Http\Controllers\RenovationController::class, 'getList']);
    Route::post('renovationdetail', [App\Http\Controllers\RenovationController::class, 'detail']);
    Route::post('renovationadd', [App\Http\Controllers\RenovationController::class, 'add']);


    //房源

    Route::post('houselist', [App\Http\Controllers\HouseController::class, 'getList']);
    //详情
    Route::post('housedetail', [App\Http\Controllers\HouseController::class, 'detail']);
    //小区房源标签
    Route::post('taglist', [App\Http\Controllers\HouseController::class, 'tag_list']);




    //房源动态
    Route::post('houseIndicatorelist', [App\Http\Controllers\HouseIndicatorController::class, 'getList']);




    //房源对比-添加
    Route::post('houseVsadd', [App\Http\Controllers\HouseVsController::class, 'add']);
    //房源对比-列表
    Route::post('houseVslist', [App\Http\Controllers\HouseVsController::class, 'getList']);
    //房源对比-详情
    Route::post('houseVsdetail', [App\Http\Controllers\HouseVsController::class, 'detail']);

    //小区
    Route::post('communitylist', [App\Http\Controllers\CommunityController::class, 'getList']);
    //小区详情
    Route::post('communitydetail', [App\Http\Controllers\CommunityController::class, 'detail']);


    //模糊推荐-小区搜索
    Route::post('searchBlurList', [App\Http\Controllers\CommunityController::class, 'search_blur_list']);

    //小二
    Route::post('peopleRandList', [App\Http\Controllers\CommunityController::class, 'people_rand_list']);





    //小区详情-小区房源
    Route::post('communityhouselist', [App\Http\Controllers\HouseController::class, 'communityHouseList']);    




    //中介费对比
    Route::post('moneyVslist', [App\Http\Controllers\MoneyVsController::class, 'getList']);

    //市场行情
    Route::post('marketInfolist', [App\Http\Controllers\MarketInfoController::class, 'getList']);

    //卖房委托 -线索
    Route::post('userClueadd', [App\Http\Controllers\UserClueController::class, 'add']);

    //用户反馈
    Route::post('userFeedbackadd', [App\Http\Controllers\UserFeedbackController::class, 'add']);
    //关于我们
    Route::post('aboutlist', [App\Http\Controllers\AboutController::class, 'getList']);
    //房源推荐
    Route::post('houseRecommenderlist', [App\Http\Controllers\HouseRecommenderController::class, 'getList']);
    // 小区下来选择列表
    Route::post('houseSelectItemlist', [App\Http\Controllers\HouseSelectItemController::class, 'getList']);
    //用户详情
    Route::post('userdetail', [App\Http\Controllers\UserController::class, 'detail']);
    //城市列表
    Route::post('citylist', [App\Http\Controllers\CityController::class, 'getList']);

    //搜索历史记录
    Route::post('userHistoryadd', [App\Http\Controllers\UserHistoryController::class, 'add']);
    //搜索历史列表
    Route::post('userHistorylist', [App\Http\Controllers\UserHistoryController::class, 'getview']);
    //搜索历史记录
    Route::post('userHistorydel', [App\Http\Controllers\UserHistoryController::class, 'del']);



    //主播列表
    Route::post('zhuboList', [App\Http\Controllers\UserController::class, 'zhuboList']);

    //主播详情
    Route::post('zhuboDetail', [App\Http\Controllers\UserController::class, 'zhuboDetail']);

    //微信小程序登录
    //登录第一步,通过code获取 openid 跟 session_key
    Route::post('wxLogingetCode', [App\Http\Controllers\WxLoginController::class, 'getCode']);






});

//验证接口
Route::group(['middleware' => ['auth.jwt.backend']], function ()
{
   

});
